﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataBase
{

    /// <summary>
    /// 对数据库的基本操作
    /// <para>仅限于读取数据库</para>
    /// </summary>
    public interface IDBRead<T>
    {
        /// <summary>
        /// 根据条件获得某个实体对象
        /// </summary>
        /// <param name="where">所传入的条件</param>
        /// <returns></returns>
        T GetEntity(object where=null);

        /// <summary>
        /// 根据条件获得某个实体的集合
        /// </summary>
        /// <param name="where">所传入的条件</param>
        /// <returns></returns>
        IEnumerable<T> GetListEntity(object where = null);
    }
}
